<template>
  <el-container>
    <el-row>
      <el-col>
        <h1>ChildFirst:{{ title }}</h1>
        <div>
          <el-input v-model="newMsg"></el-input>
          <el-button @click="modifyFn">modify msg</el-button>
        </div>
      </el-col>
    </el-row>
  </el-container>
</template>

<script>
import EventBus from '@/util/eventbus'
export default {
  data() {
    return {
      newMsg: ''
    }
  },
  props: ['title'],

  methods: {
    modifyFn() {
      EventBus.$emit('mymsg', this.newMsg)
    }
  }
}
</script>

<style></style>
